Skip to content

Addition of Inertia::response to handle both json and component #664

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from

Conversation

Sarojb31
Copy link

Addition of Inertia::reponse to allow the single route to behave as API that sends props as JSON response if the header is set to 'Accept:application/json' and behave exact to render function if the following header is not matched

It allows to send the json response from same function used to serve the Inertia Render
Headers can be passed on request Accept:application/json for the json response
By default it will work as the normal render function
@joetannenbaum
Copy link
Contributor

Closing this as we're not adding any new features or non-emergency fixes for 1.x. If this is still an issue in 2.x please submit a new PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants